export const userColumns = [
    {
        title: '序号',
        type: 'index',
        align: 'center'
    },
    {
        title: '姓名',
        align: 'center',
        key: 'userName',
        editable: true
    },
    {
        title: '性别',
        align: 'center',
        key: 'sex'
    },
    {
        title: '状态',
        align: 'center',
        key: 'status',
        render: function (h, params) {
            var status = params.row[params.column.key];
            var statusDesc;
            if (status === '0') {
                statusDesc = '初始';
            } else if (status === '1') {
                statusDesc = '正常';
            } else if (status === '2') {
                statusDesc = '冻结';
            } else if (status === '9') {
                statusDesc = '删除';
            }
            return h('span', statusDesc);
        }
    },
    {
        title: '注册时间',
        align: 'center',
        key: 'registerTime',
        render: function (h, params) {
            // var time = params.row[params.column.key];
            var time = 1491559642000;
            var timeDesc;
            if (time) {
                timeDesc = window.app.$moment(time).format('YYYY-MM-DD HH:mm:ss');
            }
            return h('span', timeDesc);
        }
    },
    {
        title: '操作',
        align: 'center',
        key: 'handle',
        handle: ['edit', 'delete']
    }
];
